+2000-07-12 Tor Lillqvist <tml@iki.fi>
+
+ Win32 changes, still doesn't build though.
+
+ * gdk/makefile.cygwin
+ * gdk/win32/makefile.cygwin
+ * gtk/makefile.cygwin: Updates.
+
+ * gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Use the same
+ default values for fg and bg pixel as X11 does (0 and 1), not
+ black and white. Use PS_ENDCAP_FLAT and PS_JOIN_MITER by default.
+ Use 0 for pen width by default (treated as 1 anyway later, but for
+ apps that might check the value in the GdkGC).
+ (gdk_win32_hdc_get, gdk_win32_hdc_release): New functions, public
+ interface to gdk_gc_predraw and _postdraw.
+
+ * gdk/win32/gdkwin32.h
+ * gdk/gdk.def: Add gdk_win32_hdc_{get,release}.
+
+ * gdk/win32/gdkcolor-win32.c (gdk_colormap_alloc1): Remove
+ extraneous semicolon.
+
+ * gdk/win32/gdkdrawable-win32.c: Check also for pen_width == 0.
+
+ * gdk/win32/gdkimage-win32.c (gdk_image_new): Use the visual's depth,
+ not the Win32 bitspixel value.
+
Tue Jul 11 20:59:35 2000 Tim Janik <timj@gtk.org>
* docs/tutorial/gtk_tut_12.es.sgml (name):
+2000-07-12 Tor Lillqvist <tml@iki.fi>
+
+ Win32 changes, still doesn't build though.
+
+ * gdk/makefile.cygwin
+ * gdk/win32/makefile.cygwin
+ * gtk/makefile.cygwin: Updates.
+
+ * gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Use the same
+ default values for fg and bg pixel as X11 does (0 and 1), not
+ black and white. Use PS_ENDCAP_FLAT and PS_JOIN_MITER by default.
+ Use 0 for pen width by default (treated as 1 anyway later, but for
+ apps that might check the value in the GdkGC).
+ (gdk_win32_hdc_get, gdk_win32_hdc_release): New functions, public
+ interface to gdk_gc_predraw and _postdraw.
+
+ * gdk/win32/gdkwin32.h
+ * gdk/gdk.def: Add gdk_win32_hdc_{get,release}.
+
+ * gdk/win32/gdkcolor-win32.c (gdk_colormap_alloc1): Remove
+ extraneous semicolon.
+
+ * gdk/win32/gdkdrawable-win32.c: Check also for pen_width == 0.
+
+ * gdk/win32/gdkimage-win32.c (gdk_image_new): Use the visual's depth,
+ not the Win32 bitspixel value.
+
Tue Jul 11 20:59:35 2000 Tim Janik <timj@gtk.org>
* docs/tutorial/gtk_tut_12.es.sgml (name):
+2000-07-12 Tor Lillqvist <tml@iki.fi>
+
+ Win32 changes, still doesn't build though.
+
+ * gdk/makefile.cygwin
+ * gdk/win32/makefile.cygwin
+ * gtk/makefile.cygwin: Updates.
+
+ * gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Use the same
+ default values for fg and bg pixel as X11 does (0 and 1), not
+ black and white. Use PS_ENDCAP_FLAT and PS_JOIN_MITER by default.
+ Use 0 for pen width by default (treated as 1 anyway later, but for
+ apps that might check the value in the GdkGC).
+ (gdk_win32_hdc_get, gdk_win32_hdc_release): New functions, public
+ interface to gdk_gc_predraw and _postdraw.
+
+ * gdk/win32/gdkwin32.h
+ * gdk/gdk.def: Add gdk_win32_hdc_{get,release}.
+
+ * gdk/win32/gdkcolor-win32.c (gdk_colormap_alloc1): Remove
+ extraneous semicolon.
+
+ * gdk/win32/gdkdrawable-win32.c: Check also for pen_width == 0.
+
+ * gdk/win32/gdkimage-win32.c (gdk_image_new): Use the visual's depth,
+ not the Win32 bitspixel value.
+
Tue Jul 11 20:59:35 2000 Tim Janik <timj@gtk.org>
* docs/tutorial/gtk_tut_12.es.sgml (name):
+2000-07-12 Tor Lillqvist <tml@iki.fi>
+
+ Win32 changes, still doesn't build though.
+
+ * gdk/makefile.cygwin
+ * gdk/win32/makefile.cygwin
+ * gtk/makefile.cygwin: Updates.
+
+ * gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Use the same
+ default values for fg and bg pixel as X11 does (0 and 1), not
+ black and white. Use PS_ENDCAP_FLAT and PS_JOIN_MITER by default.
+ Use 0 for pen width by default (treated as 1 anyway later, but for
+ apps that might check the value in the GdkGC).
+ (gdk_win32_hdc_get, gdk_win32_hdc_release): New functions, public
+ interface to gdk_gc_predraw and _postdraw.
+
+ * gdk/win32/gdkwin32.h
+ * gdk/gdk.def: Add gdk_win32_hdc_{get,release}.
+
+ * gdk/win32/gdkcolor-win32.c (gdk_colormap_alloc1): Remove
+ extraneous semicolon.
+
+ * gdk/win32/gdkdrawable-win32.c: Check also for pen_width == 0.
+
+ * gdk/win32/gdkimage-win32.c (gdk_image_new): Use the visual's depth,
+ not the Win32 bitspixel value.
+
Tue Jul 11 20:59:35 2000 Tim Janik <timj@gtk.org>
* docs/tutorial/gtk_tut_12.es.sgml (name):
+2000-07-12 Tor Lillqvist <tml@iki.fi>
+
+ Win32 changes, still doesn't build though.
+
+ * gdk/makefile.cygwin
+ * gdk/win32/makefile.cygwin
+ * gtk/makefile.cygwin: Updates.
+
+ * gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Use the same
+ default values for fg and bg pixel as X11 does (0 and 1), not
+ black and white. Use PS_ENDCAP_FLAT and PS_JOIN_MITER by default.
+ Use 0 for pen width by default (treated as 1 anyway later, but for
+ apps that might check the value in the GdkGC).
+ (gdk_win32_hdc_get, gdk_win32_hdc_release): New functions, public
+ interface to gdk_gc_predraw and _postdraw.
+
+ * gdk/win32/gdkwin32.h
+ * gdk/gdk.def: Add gdk_win32_hdc_{get,release}.
+
+ * gdk/win32/gdkcolor-win32.c (gdk_colormap_alloc1): Remove
+ extraneous semicolon.
+
+ * gdk/win32/gdkdrawable-win32.c: Check also for pen_width == 0.
+
+ * gdk/win32/gdkimage-win32.c (gdk_image_new): Use the visual's depth,
+ not the Win32 bitspixel value.
+
Tue Jul 11 20:59:35 2000 Tim Janik <timj@gtk.org>
* docs/tutorial/gtk_tut_12.es.sgml (name):
+2000-07-12 Tor Lillqvist <tml@iki.fi>
+
+ Win32 changes, still doesn't build though.
+
+ * gdk/makefile.cygwin
+ * gdk/win32/makefile.cygwin
+ * gtk/makefile.cygwin: Updates.
+
+ * gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Use the same
+ default values for fg and bg pixel as X11 does (0 and 1), not
+ black and white. Use PS_ENDCAP_FLAT and PS_JOIN_MITER by default.
+ Use 0 for pen width by default (treated as 1 anyway later, but for
+ apps that might check the value in the GdkGC).
+ (gdk_win32_hdc_get, gdk_win32_hdc_release): New functions, public
+ interface to gdk_gc_predraw and _postdraw.
+
+ * gdk/win32/gdkwin32.h
+ * gdk/gdk.def: Add gdk_win32_hdc_{get,release}.
+
+ * gdk/win32/gdkcolor-win32.c (gdk_colormap_alloc1): Remove
+ extraneous semicolon.
+
+ * gdk/win32/gdkdrawable-win32.c: Check also for pen_width == 0.
+
+ * gdk/win32/gdkimage-win32.c (gdk_image_new): Use the visual's depth,
+ not the Win32 bitspixel value.
+
Tue Jul 11 20:59:35 2000 Tim Janik <timj@gtk.org>
* docs/tutorial/gtk_tut_12.es.sgml (name):
+2000-07-12 Tor Lillqvist <tml@iki.fi>
+
+ Win32 changes, still doesn't build though.
+
+ * gdk/makefile.cygwin
+ * gdk/win32/makefile.cygwin
+ * gtk/makefile.cygwin: Updates.
+
+ * gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Use the same
+ default values for fg and bg pixel as X11 does (0 and 1), not
+ black and white. Use PS_ENDCAP_FLAT and PS_JOIN_MITER by default.
+ Use 0 for pen width by default (treated as 1 anyway later, but for
+ apps that might check the value in the GdkGC).
+ (gdk_win32_hdc_get, gdk_win32_hdc_release): New functions, public
+ interface to gdk_gc_predraw and _postdraw.
+
+ * gdk/win32/gdkwin32.h
+ * gdk/gdk.def: Add gdk_win32_hdc_{get,release}.
+
+ * gdk/win32/gdkcolor-win32.c (gdk_colormap_alloc1): Remove
+ extraneous semicolon.
+
+ * gdk/win32/gdkdrawable-win32.c: Check also for pen_width == 0.
+
+ * gdk/win32/gdkimage-win32.c (gdk_image_new): Use the visual's depth,
+ not the Win32 bitspixel value.
+
Tue Jul 11 20:59:35 2000 Tim Janik <timj@gtk.org>
* docs/tutorial/gtk_tut_12.es.sgml (name):
gdk_visual_ref
gdk_visual_unref
gdk_wcstombs
+ gdk_win32_hdc_get
+ gdk_win32_hdc_release
gdk_window_add_filter
gdk_window_at_pointer
gdk_window_begin_paint_rect
OPTIMIZE = -g
-################################################################
-
-# Nothing much configurable below
+TOP = ../..
-CC = gcc -mno-cygwin -mpentium -fnative-struct
+include $(TOP)/build/win32/make.mingw
-CP = cp
+################################################################
-GLIB_VER=1.3
-GTK_VER=1.3
+# Nothing much configurable below
-GLIB = ../../glib
-CFLAGS = $(OPTIMIZE) -I . -I .. -I $(GLIB) -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\"
+INCLUDES = -I . -I .. -I ../gdk-pixbuf
+DEPCFLAGS = $(GLIB_CFLAGS) $(PANGO_CFLAGS)
+DEFINES = -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\"
all: \
../config.h \
gdkgc.o \
gdkglobals.o \
gdkimage.o \
+ gdkkeyuni.o \
+ gdkpango.o \
+ gdkpixbuf-drawable.o \
+ gdkpixbuf-render.o \
+ gdkpixmap.o \
+ gdkpolyreg-generic.o \
gdkrgb.o \
gdkrectangle.o \
+ gdkregion-generic.o \
gdkwindow.o
../config.h : ../config.h.win32
- $(CP) ../config.h.win32 ../config.h
+ cp $< $@
gdkconfig.h : gdkconfig.h.win32
- $(CP) gdkconfig.h.win32 gdkconfig.h
+ cp $< $@
gdk-$(GTK_VER).dll : $(gdk_OBJECTS) gdk.def win32/libgdk-win32.a win32/gdk-win32res.o
- $(GLIB)/build-dll gdk $(GTK_VER) gdk.def $(gdk_OBJECTS) -L win32 -lgdk-win32 -lwntab32x -L $(GLIB) -lglib-$(GLIB_VER) -lgdi32 -luser32 -limm32 -lshell32 -lole32 -luuid $(LDFLAGS) win32/gdk-win32res.o
-
-.SUFFIXES: .c .o .i
-
-.c.o :
- $(CC) $(CFLAGS) -c -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $<
-
-.c.i :
- $(CC) $(CFLAGS) -E -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $< >$@
-
-clean:
- -rm *.exe *.o *.dll *.a *.exp *.base
+ $(GLIB)/build-dll gdk $(GTK_VER) gdk.def $(gdk_OBJECTS) -L win32 -lgdk-win32 -lwntab32x $(GLIB_LIBS) -lgdi32 -luser32 -limm32 -lshell32 -lole32 -luuid $(LDFLAGS) win32/gdk-win32res.o
if (alloc_color (private->xcolormap, &xcolor, &ret->pixel))
{
ret->red = (xcolor.peRed * 65535) / 255;
- ret->green = (xcolor.peGreen * 65535) / 255;;
+ ret->green = (xcolor.peGreen * 65535) / 255;
ret->blue = (xcolor.peBlue * 65535) / 255;
if ((guint) ret->pixel < colormap->size)
WIN32_GDI_FAILED ("LineTo"), ok = FALSE;
/* Draw end pixel */
- if (ok && gc_data->pen_width == 1)
+ if (ok && gc_data->pen_width <= 1)
if (!LineTo (hdc, segs[i].x2 + 1, segs[i].y2))
WIN32_GDI_FAILED ("LineTo"), ok = FALSE;
}
WIN32_GDI_FAILED ("LineTo");
/* Draw end pixel */
- if (gc_data->pen_width == 1)
+ if (gc_data->pen_width <= 1)
if (!LineTo (hdc, segs[i].x2 + 1, segs[i].y2))
WIN32_GDI_FAILED ("LineTo");
}
g_free (pts);
/* Draw end pixel */
- if (gc_data->pen_width == 1)
+ if (gc_data->pen_width <= 1)
{
MoveToEx (hdc, points[npoints-1].x, points[npoints-1].y, NULL);
if (!LineTo (hdc, points[npoints-1].x + 1, points[npoints-1].y))
* we draw the end pixel separately... With wider pens we don't care.
* //HB: But the NT developers don't read their API documentation ...
*/
- if (gc_data->pen_width == 1 && windows_version > 0x80000000)
+ if (gc_data->pen_width <= 1 && windows_version > 0x80000000)
if (!LineTo (hdc, points[npoints-1].x + 1, points[npoints-1].y))
WIN32_GDI_FAILED ("LineTo");
#endif
* Blocks.txt from ftp.unicode.org. The bit number field is the bitfield
* number as in the FONTSIGNATURE struct's fsUsb field.
* There are some grave bugs in the table in the books. For instance
- * it claims there are Hangul at U+3400..U+4DFF while this range in
+ * it claims there are Hangul at U+3400..U+4DFF while this range in
* fact contains CJK Unified Ideographs Extension A. Also, the whole
* block of Hangul Syllables U+AC00..U+D7A3 is missing from the book.
*/
GdkGC *gc;
GdkGCPrivate *private;
GdkGCWin32Data *data;
- static GdkColor black;
- static GdkColor white;
- static gboolean beenhere = FALSE;
-
- if (!beenhere)
- {
- gdk_color_black (gdk_colormap_get_system (), &black);
- gdk_color_white (gdk_colormap_get_system (), &white);
- beenhere = TRUE;
- }
gc = gdk_gc_alloc ();
private = (GdkGCPrivate *)gc;
data->clip_region = NULL;
- data->foreground = black.pixel;
- data->background = white.pixel;
+ /* Use the same default values as X11 does, even if they don't make
+ * sense per se. But apps always set fg and bg anyway.
+ */
+ data->foreground = 0;
+ data->background = 1;
data->font = NULL;
data->rop2 = R2_COPYPEN;
data->fill_style = GDK_SOLID;
data->tile = NULL;
data->stipple = NULL;
- data->pen_style = PS_GEOMETRIC;
- data->pen_width = 1;
+ data->pen_style = PS_GEOMETRIC|PS_ENDCAP_FLAT|PS_JOIN_MITER;
+ data->pen_width = 0;
data->values_mask = GDK_GC_FUNCTION | GDK_GC_FILL;
logbrush.lbStyle = BS_SOLID;
logbrush.lbColor = fg;
- if (*ok && (hpen = ExtCreatePen (data->pen_style, data->pen_width,
+ if (*ok && (hpen = ExtCreatePen (data->pen_style,
+ (data->pen_width > 0 ? data->pen_width : 1),
&logbrush, 0, NULL)) == NULL)
WIN32_GDI_FAILED ("ExtCreatePen");
data->xgc = NULL;
}
+HDC
+gdk_win32_hdc_get (GdkDrawable *drawable,
+ GdkGC *gc,
+ GdkGCValuesMask usage)
+{
+ return gdk_gc_predraw (drawable, (GdkGCPrivate *) gc, usage);
+}
+
+void
+gdk_win32_hdc_release (GdkDrawable *drawable,
+ GdkGC *gc,
+ GdkGCValuesMask usage)
+{
+ gdk_gc_postdraw (drawable, (GdkGCPrivate *) gc, usage);
+}
+
/* This function originally from Jean-Edouard Lachand-Robert, and
* available at www.codeguru.com. Simplified for our needs, now
* handles just one-bit deep bitmaps (in Window parlance, ie those
gint width,
gint height)
{
- GdkVisualPrivate *visual_private = (GdkVisualPrivate *) visual;
return gdk_image_new_with_depth (type, visual, width, height,
- visual_private->xvisual->bitspixel);
+ visual->depth);
}
GdkImage*
struct _GdkColormapPrivateWin32
{
- GdkColormapPrivate base;
Colormap xcolormap;
gint private_val;
struct _GdkImagePrivateWin32
{
- GdkImagePrivate base;
HBITMAP ximage;
};
/* Return the Gdk* for a particular HANDLE */
gpointer gdk_xid_table_lookup (HANDLE handle);
+/* Return a device context to draw in a drawable, given a GDK GC,
+ * and a mask indicating which GC values might be used (for efficiency,
+ * no need to muck around with text-related stuff if we aren't going
+ * to output text, for instance).
+ */
+HDC gdk_win32_hdc_get (GdkDrawable *drawable,
+ GdkGC *gc,
+ GdkGCValuesMask usage);
+
+
+/* Each HDC returned from gdk_win32_hdc_get must be released with
+ * this function
+ */
+void gdk_win32_hdc_release (GdkDrawable *drawable,
+ GdkGC *gc,
+ GdkGCValuesMask usage);
+
#endif /* __GDK_WIN32_H__ */
OPTIMIZE = -g
-################################################################
+TOP = ../../..
-# Nothing much configurable below
+include $(TOP)/build/win32/make.mingw
-CC = gcc -mno-cygwin -mpentium -fnative-struct
+################################################################
-GLIB_VER=1.3
-GTK_VER=1.3
+# Nothing much configurable below
-GLIB = ../../../glib
-CFLAGS = $(OPTIMIZE) -I . -I .. -I ../.. -I $(WTKIT)/include -I $(GLIB) -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\"
+INCLUDES = -I ../.. -I .. -I $(WTKIT)/include
+DEPCFLAGS = $(GLIB_CFLAGS) $(PANGO_CFLAGS)
+DEFINES = -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\"
all: \
../../config.h \
gdkmain-win32.o \
gdkpixmap-win32.o \
gdkproperty-win32.o \
- gdkpolyreg-generic.o \
- gdkregion-generic.o \
gdkselection-win32.o \
gdkvisual-win32.o \
gdkwin32id.o \
../gdkconfig.h : ../gdkconfig.h.win32
cp $< $@
-gdkregion-generic.c: ../x11/gdkregion-generic.c
- cp $< $@
-
-gdkpolyreg-generic.c: ../x11/gdkpolyreg-generic.c
- cp $< $@
-
-gdkregion-generic.h: ../x11/gdkregion-generic.h
- cp $< $@
-
-gdkpoly-generic.h: ../x11/gdkpoly-generic.h
- cp $< $@
-
-gdkgc-win32.o:: gdkregion-generic.h
-gdkpolyreg-generic.o:: gdkpoly-generic.h
-
# Kludge to get the path to the win32 headers
WIN32APIHEADERS = $(shell echo "\#include <winver.h>" | $(CC) -M -E - | tail -1 | sed -e 's![\\/]winver.h!!' | tr -d '\015')
libwntab32x.a : $(WTKIT)/lib/i386/wntab32x.lib
cp $(WTKIT)/lib/i386/wntab32x.lib libwntab32x.a
-
-.SUFFIXES: .c .o .i
-
-.c.o :
- $(CC) $(CFLAGS) -c -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $<
-
-.c.i :
- $(CC) $(CFLAGS) -E -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $< >$@
-
-clean:
- -rm *.exe *.o *.dll *.a *.exp *.base
gdkpixmap-win32.obj \
gdkproperty-win32.obj \
gdkregion-win32.obj \
- gdkpolyreg-generic.obj \
- gdkregion-generic.obj \
gdkselection-win32.obj \
gdkvisual-win32.obj \
gdkwin32id.obj \
..\gdkconfig.h : ..\gdkconfig.h.win32
copy ..\gdkconfig.h.win32 ..\gdkconfig.h
-gdkregion-generic.c: ..\x11\gdkregion-generic.c
- copy ..\x11\gdkregion-generic.c gdkregion-generic.c
-
-gdkpolyreg-generic.c: ..\x11\gdkpolyreg-generic.c
- copy ..\x11\gdkpolyreg-generic.c gdkpolyreg-generic.c
-
-gdkregion-generic.h: ..\x11\gdkregion-generic.h
- copy ..\x11\gdkregion-generic.h gdkregion-generic.h
-
-gdkpoly-generic.h: ..\x11\gdkpoly-generic.h
- copy ..\x11\gdkpoly-generic.h gdkpoly-generic.h
-
-gdkgc-win32.o:: gdkregion-generic.h
-gdkpolyreg-generic.o:: gdkpoly-generic.h
-
gdk.res : rc\gdk.rc
rc -DBUILDNUMBER=0 -r -fo gdk.res rc\gdk.rc
OPTIMIZE = -g
+TOP = ../..
+
+include $(TOP)/build/win32/make.mingw
+
################################################################
# Nothing much configurable below
-CC = gcc -mno-cygwin -mpentium -fnative-struct
-
# Perl and awk are needed to generate some source files.
-# These generated source files are distribuyted with the Win32 GTk+ source
+# These generated source files are distributed with the Win32 GTk+ source
# distributions, so don't worry if you don't have perl and awk.
PERL = perl
AWK = awk
-GLIB_VER=1.3
-GTK_VER=1.3
-
-GLIB = ../../glib
-INTL = ../../intl
+INCLUDES = -I . -I .. -I ../gdk -I $(GLIB) -I $(GLIB)/gmodule -I $(INTL)
+DEFINES = -DGTK_DISABLE_COMPAT_H -DGTK_COMPILATION -DG_LOG_DOMAIN=\"Gtk\" -DG_LOG_DOMAIN=\"Gtk\"
-CFLAGS = $(OPTIMIZE) -I . -I .. -I ../gdk -I $(GLIB) -I $(GLIB)/gmodule -I $(INTL) -DGTK_DISABLE_COMPAT_H
+WIN32APIHEADERS=$(shell echo "\#include <winver.h>" | $(CC) -M -E - | tail -1 | sed -e 's![\\/]winver.h!!' | tr -d '\015')
all : \
../config.h \
gtk-$(GTK_VER).dll : generated $(gtk_OBJECTS) gtk.def
$(GLIB)/build-dll gtk $(GTK_VER) gtk.def $(gtk_OBJECTS) -L ../gdk -lgdk-$(GTK_VER) -L$(INTL) -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -L $(GLIB)/gmodule -lgmodule-$(GLIB_VER) -L $(GLIB)/gobject -lgobject-$(GLIB_VER) -luser32
-.SUFFIXES: .c .o .i
-
-# General rule for compiling the objects into the DLL
-.c.o :
- $(CC) $(CFLAGS) -c -DGTK_COMPILATION -DG_LOG_DOMAIN=\"Gtk\" $<
-
-.c.i :
- $(CC) $(CFLAGS) -E -DGTK_COMPILATION -DG_LOG_DOMAIN=\"Gtk\" $< >$@
-
#
# Test programs:
#
testdnd.exe : testdnd.o
- $(CC) $(CFLAGS) -o $@ testdnd.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) -L $(GLIB) -lglib-$(GLIB_VER) -L $(GLIB)/gobject -lgobject-$(GLIB_VER) $(LDFLAGS)
+ $(CC) $(CFLAGS) -o $@ testdnd.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) $(GLIB_LIBS) $(LDFLAGS)
# Must have separate rules for these objects that don't go in the DLL
testdnd.o : testdnd.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testdnd\" testdnd.c
testgtk.exe : testgtk.o
- $(CC) $(CFLAGS) -o $@ testgtk.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) -L $(GLIB) -lglib-$(GLIB_VER) -L $(GLIB)/gobject -lgobject-$(GLIB_VER) $(LDFLAGS)
+ $(CC) $(CFLAGS) -o $@ testgtk.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) $(GLIB_LIBS) $(LDFLAGS)
testgtk.o : testgtk.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testgtk\" testgtk.c
testinput.exe : testinput.o
- $(CC) $(CFLAGS) -o $@ testinput.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) -L $(GLIB) -lglib-$(GLIB_VER) -L $(GLIB)/gobject -lgobject-$(GLIB_VER) $(LDFLAGS)
+ $(CC) $(CFLAGS) -o $@ testinput.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) $(GLIB_LIBS) $(LDFLAGS)
testinput.o : testinput.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testinput\" testinput.c
testrgb.exe : testrgb.o
- $(CC) $(CFLAGS) -o $@ testrgb.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) -L $(GLIB) -lglib-$(GLIB_VER) -L $(GLIB)/gobject -lgobject-$(GLIB_VER) $(LDFLAGS)
+ $(CC) $(CFLAGS) -o $@ testrgb.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) $(GLIB_LIBS) $(LDFLAGS)
testrgb.o : testrgb.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testrgb\" testrgb.c
testselection.exe : testselection.o
- $(CC) $(CFLAGS) -o $@ testselection.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) -L $(GLIB) -lglib-$(GLIB_VER) -L $(GLIB)/gobject -lgobject-$(GLIB_VER) $(LDFLAGS)
+ $(CC) $(CFLAGS) -o $@ testselection.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) $(GLIB_LIBS) $(LDFLAGS)
testselection.o : testselection.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testselection\" testselection.c
testthreads.exe : testthreads.o
- $(CC) $(CFLAGS) -o $@ testthreads.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) -L $(GLIB) -lglib-$(GLIB_VER) -L $(GLIB)/gthread -lgthread-$(GLIB_VER) -L $(GLIB)/gobject -lgobject-$(GLIB_VER) $(PTHREAD_LIB) $(LDFLAGS)
+ $(CC) $(CFLAGS) -o $@ testthreads.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) $(GLIB_LIBS) $(PTHREAD_LIB) $(LDFLAGS)
testthreads.o : testthreads.c
$(CC) $(CFLAGS) -I$(PTHREAD_INC) -c -DG_LOG_DOMAIN=\"testthreads\" -DUSE_PTHREADS=1 testthreads.c
simple.exe : simple.o
- $(CC) $(CFLAGS) -o $@ simple.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) -L $(GLIB) -lglib-$(GLIB_VER) -L $(GLIB)/gobject -lgobject-$(GLIB_VER) $(LDFLAGS)
+ $(CC) $(CFLAGS) -o $@ simple.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) $(GLIB_LIBS) $(LDFLAGS)
simple.o : simple.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"simple\" simple.c
# The rmgen target removes just the generated source files
rmgen:
-rm $(GENERATED)
-
-# The clean target doesn't remove the generated sources
-clean:
- -rm *.exe *.o *.dll *.a *.exp *.base